<script setup>
import { useRoute } from 'vue-router'
import { ref, onUpdated } from 'vue'
const route = useRoute()
let id = ref('')
let name = ref('')
id.value = route.query.id
name.value = route.query.name

onUpdated(() => {
    id.value = route.query.id
    name.value = route.query.name
})


</script>


<template>
    <div>
        <h1>ShowDetail接受键值对参数</h1>
        id是{{ id }} name是{{ name }}
    </div>
</template>
